package com.epam.cdp.jpa.model;

import javax.persistence.Column;
import javax.persistence.Entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Entity
public class User extends BaseEntity {
    
    private static final long serialVersionUID = 1L;

    @Column(unique = true)
    private String email;
    
    // WARNING plain text password TODO add encription in future
    private String password;

    @Column(nullable = false)
    private Role role;
    
    public User() {
	role = Role.USER;
    }
}
